/*
 * DeveloperTaskWidget.java
 *
 * Created on February 21, 2008, 5:41 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package projectprophet.app;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Rectangle;
import java.awt.Graphics;
import java.awt.Graphics2D;
import javax.swing.JComponent;
import javax.swing.Scrollable;

/**
 *
 * @author luppy
 */
public class DeveloperTaskWidget extends JComponent implements Scrollable
{
	
	/** Creates a new instance of DeveloperTaskWidget */
	public DeveloperTaskWidget()
	{
	}
	public void paint(Graphics g)
	{
		super.paint(g);
		Graphics2D g2 = (Graphics2D)g;
		g2.setColor(Color.BLUE);
		for( int x = 0; x < 100; x+=20 )
		{
			g2.fill3DRect( 10+x, 10,20,20,false);
		}
		g2.fill3DRect(150,150,100,100,true);
		System.out.println("Paint");
		
	}
	
	// Scrollable
    public Dimension getPreferredScrollableViewportSize()
	{
		return preferredScrollableViewportSize;
	}

	public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
	{
		return 1;
	}
    public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
	{
		return 1;
	}
    public boolean getScrollableTracksViewportWidth()
	{
		return false;
	}
    public boolean getScrollableTracksViewportHeight()
	{
		return false;
	}

	private static final Dimension preferredScrollableViewportSize = new Dimension(320, 200);
}
